package cn.tedu.douguo.user.service.impl;

import cn.tedu.douguo.commons.ex.ServiceException;
import cn.tedu.douguo.commons.web.ServiceCode;
import cn.tedu.douguo.user.mapper.CategoryMapper;
import cn.tedu.douguo.user.mapper.UserMapper;
import cn.tedu.douguo.user.pojo.entity.User;
import cn.tedu.douguo.user.pojo.param.UserLoginInfoParam;
import cn.tedu.douguo.user.pojo.param.UserRegInfoParam;
import cn.tedu.douguo.user.pojo.vo.CategoryListVO;
import cn.tedu.douguo.user.security.UserDetails;
import cn.tedu.douguo.user.service.CategoryService;
import cn.tedu.douguo.user.service.UserService;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.*;


@Service
@Slf4j
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    private CategoryMapper mapper;


    @Override
    public List<CategoryListVO> list() {
        List<CategoryListVO> list = mapper.list();
        return list;
    }

    @Override
    public List<CategoryListVO> listFirst() {
        List<CategoryListVO> listFirst = mapper.listFirst();
        return listFirst;
    }


    @Override
    public List<CategoryListVO> listSecond() {
        List<CategoryListVO> listSecond = mapper.listSecond();
        return listSecond;
    }

    @Override
    public List<CategoryListVO> listThird() {
        List<CategoryListVO> listThird = mapper.listThird();
        return listThird;
    }
}
